import request from '@/utils/request'

export function getNewsCategoryList(query) {
    return request({
        url: '/news/getNewsCategory',
        method: 'get',
        params: query
    })
}

export function getCategory(query) {
    return request({
        url: '/news/getCategory',
        method: 'get',
        params: query
    })
}
//删除
export function delCategory(query) {
    return request({
        url: '/news/delCategory',
        method: 'get',
        params: query
    })
}

export function catSave(query) {
    return request({
        url: '/news/categorySave',
        method: 'post',
        data: query
    })
}

//资讯列表
export function getNewsList(query) {
    return request({
        url: '/news',
        method: 'get',
        params: query
    })
}

//资讯详情
export function getNewsDetails(query) {
    return request({
        url: '/news/getNewsDetails',
        method: 'get',
        params: query
    })
}
//资讯保存
export function newsSave(query) {
    return request({
        url: '/news/save',
        method: 'post',
        data: query
    })
}
//资讯删除
export function delNews(query) {
    return request({
        url: '/news/delete',
        method: 'post',
        data: query
    })
}
